Skip to content

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Aug 16, 2025

Description

The previous one is testing only "synchronous" cache mechanism as they are all called in side Promise.all. Changing it so the asynchronus tracking can be seen more obviously. And this actually shows React.cache is broken on Stackblitz since it internally uses AsyncLocalStorage which doesn't work properly.

(cacheFnCount = {cacheFnCount}, nonCacheFnCount = {nonCacheFnCount})

This should show

'(cacheFnCount = 2, nonCacheFnCount = 3)',

but on stackblitz, it shows

(cacheFnCount = 3, nonCacheFnCount = 3)

@hi-ogawa hi-ogawa marked this pull request as ready for review August 16, 2025 02:01
@hi-ogawa hi-ogawa merged commit cc1bcdf into main Aug 16, 2025
22 checks passed
@hi-ogawa hi-ogawa deleted the 08-16-chore_rsc_tweak_react.cache_example branch August 16, 2025 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant